home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / internet-drafts / draft-ietf-x400ops-charactersets-02.txt < prev    next >
Text File  |  1993-03-21  |  27KB  |  803 lines

  1. draft            X.400 use of extended character sets           Mar 93
  2.  
  3.  
  4.                    X.400 use of extended character sets
  5.  
  6.                        Thu Mar 18 14:03:38 MET 1993
  7.  
  8.  
  9.                          Harald Tveit Alvestrand
  10.                                SINTEF DELAB
  11.                     Harald.Alvestrand@delab.sintef.no
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.     Status of this Memo
  19.  
  20.     This draft document is being circulated for comment.
  21.  
  22.     If consensus is reached it may be submitted to the RFC editor as a
  23.     Proposed Standard protocol specificiation, for use in X.400 in the
  24.     Internet.
  25.  
  26.     Please send comments to the author, or to the RARE WG-MSG list
  27.     <wg-msg@rare.nl>.
  28.  
  29.     The following text is required by the Internet-draft rules:
  30.  
  31.     This document is an Internet Draft.  Internet Drafts are working
  32.     documents of the Internet Engineering Task Force (IETF), its
  33.     Areas, and its Working Groups. Note that other groups may also
  34.     distribute working documents as Internet Drafts.
  35.  
  36.     Internet Drafts are draft documents valid for a maximum of six
  37.     months. Internet Drafts may be updated, replaced, or obsoleted by
  38.     other documents at any time.  It is not appropriate to use
  39.     Internet Drafts as reference material or to cite them other than
  40.     as a "working draft" or "work in progress."
  41.  
  42.     Please check the I-D abstract listing contained in each Internet
  43.     Draft directory to learn the current status of this or any other
  44.     Internet Draft.
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53. Alvestrand                Expires Sep 18 93                   [Page 1]
  54.  
  55. draft            X.400 use of extended character sets           Mar 93
  56.  
  57.  
  58.     1.  Introduction
  59.  
  60.     Since 1988, X.400 has had the capacity for carrying a large number
  61.     of different character sets in a message by using the body part
  62.     "GeneralText" defined by ISO/IEC 10021-7.
  63.  
  64.     Since 1992, the Internet also has the means of passing around
  65.     messages containing multiple character sets, by using the
  66.     mechanism defined in RFC-MIME.
  67.  
  68.     This RFC defines a suggested method of using "GeneralText" in
  69.     order to harmonize as much as possible the usage of this body
  70.     part.
  71.  
  72.  
  73.     2.  General principles
  74.  
  75.     2.1.  Goals
  76.  
  77.     The target of this memo is to define a way of using existing
  78.     standards to achieve:
  79.  
  80.  
  81.     (1)  in the short term, a standard for sending E-mail in the
  82.          European languages (Latin letters with European accents,
  83.          Greek and Cyrillic)
  84.  
  85.     (2)  in the medium term, extending this to cover the Hebrew and
  86.          Arabic character sets
  87.  
  88.     (3)  in the long term, opening up true international E-mail by
  89.          allowing the full character set specified in ISO-10646 to be
  90.          used.
  91.  
  92.  
  93.     The author believes that this document gives a specification that
  94.     can easily accomodate the use of any character set in the ISO
  95.     registry, and, by giving guidance rules for choosing character
  96.     sets, will help interworking.
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107. Alvestrand                Expires Sep 18 93                   [Page 2]
  108.  
  109. draft            X.400 use of extended character sets           Mar 93
  110.  
  111.  
  112.     2.2.  Families of character sets
  113.  
  114.  
  115.     2.2.1.  ISO 6937/T.61
  116.  
  117.     ISO 6937 is a code technique used and recommended in T.51 and
  118.     T.101 (Teletex and Videotex service) and in X.500, providing a
  119.     repertoire of 333 characters from the Latin script by use of non-
  120.     spacing diacritical marks. It corresponds closely to CCITT
  121.     recommendation T.61.
  122.  
  123.     The problem with that technique is that the character stream comes
  124.     in two modes, i.e some characters are coded with one byte and some
  125.     with two (composite characters). This makes information processing
  126.     systems such as an E-mail UA or GW more complex.
  127.  
  128.     It is also not extensible to other languages like Korean or
  129.     Chinese, or even Greek, without invoking the character set
  130.     switching techniques of ISO 2022.
  131.  
  132.  
  133.     2.2.2.  ISO 8859
  134.  
  135.     ISO 8859 defines a set of character sets, each suitable for use in
  136.     some group of languages. Each character in ISO 8859 is coded in a
  137.     single byte.
  138.  
  139.     There are currently 9 parts of ISO 8859, plus a "supplementary"
  140.     set, registered as ISO IR 154. All languages using single-byte
  141.     characters can be written in one or another of the ISO 8859 sets.
  142.     There are sets covering Greek, Hebrew and Arabic.
  143.  
  144.     All the ISO 8859 sets include US ASCII as a subset. All use 8
  145.     bits.
  146.  
  147.     ISO 8859 is regarded by many as a solution; for instance, the X
  148.     windows system now comes with ISO-8859-1 as the "standard"
  149.     character set, with the possibility of specifying others. But
  150.     since the same applications often do not support character set
  151.     switching within text, it is problematic to use these in a truly
  152.     multilingual environment.  (Also, most fonts claiming to be "ISO-
  153.     8859-1" in X11R5 are actually 7-bit fonts. The implied lie is very
  154.     unfortunate.)
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161. Alvestrand                Expires Sep 18 93                   [Page 3]
  162.  
  163. draft            X.400 use of extended character sets           Mar 93
  164.  
  165.  
  166.     It turns out to work fine, however, if the second language is
  167.     English, since this can be written in all ISO 8859 sets.
  168.  
  169.     The parts 3 and 4 have not seen wide acceptance, and it is
  170.     expected that they will be discarded. They should therefore not be
  171.     used.
  172.  
  173.  
  174.     2.2.3.  ISO 10646
  175.  
  176.     At the moment of writing, ISO 10646 has just been accepted as an
  177.     International Standard. It is basically a 32-bit character set,
  178.     with all of the currently used characters being numbered by the
  179.     first 16 bits, leaving some room for expansion.
  180.  
  181.     It is not possible to use ISO 10646 as a normal character set,
  182.     because it does not conform to the rules for usage of byte values
  183.     set down in ISO 2022 and other places; it uses the "control space"
  184.     for (parts of) graphic character codes.
  185.  
  186.     There are a number of ways to encode ISO 10646 characters "on the
  187.     wire". There are methods within the ISO 2022 standard to switch to
  188.     these, either as "other coding system without return" or as "other
  189.     coding system with return" (that is, you can go back from it to
  190.     the one you came from using an ISO 2022 escape sequence).
  191.  
  192.     The following registrations have been made:
  193.  
  194.  
  195.     ISO 10646 UCS-2 Level 1 has been registered with ESC 2/5 2/15 4/0,
  196.     ISO 10646 UCS-4 Level 1 has been registered with ESC 2/5 2/15 4/1,
  197.  
  198.     The following are applied for:
  199.  
  200.     Reg# Escape sequence  Standard/Sponsor   Description
  201.     174  ESC 2/5 2/15 F   ISO/IEC 10646      UCS-2, Level 2
  202.     175  ESC 2/5 2/15 F   ISO/IEC 10646      UCS-4, Level 2
  203.     176  ESC 2/5 2/15 F   ISO/IEC 10646      UCS-2, Level 3
  204.     177  ESC 2/5 2/15 F   ISO/IEC 10646      UCS-4, Level 3
  205.     178  ESC 2/5 F        ISO/IEC 10646      UTF-1
  206.  
  207.     << NOTE: The registration numbers for UCS-2 level 1 and UCS-4
  208.     level 1 are not known. Neither are the assigned final characters
  209.     for the other sets. Information requested!>>
  210.  
  211.  
  212.  
  213.  
  214.  
  215. Alvestrand                Expires Sep 18 93                   [Page 4]
  216.  
  217. draft            X.400 use of extended character sets           Mar 93
  218.  
  219.  
  220.     This character set will become very important in the future, but
  221.     at the moment, few systems are able to support this directly.
  222.  
  223.     The GeneralText body part can be used for carrying any of these
  224.     character sets.
  225.  
  226.  
  227.     2.3.  Body parts that can be used in X.400
  228.  
  229.     At the moment, no established way of transferring a full set of
  230.     characters in X.400-based E-mail exists.  In the future, it is
  231.     likely that a new body part, based in ISO 10646, will be
  232.     available; it is, however, dangerous to try to specify this body
  233.     part before ISO 10646 is final.
  234.  
  235.     In the short term, the deployed and available body parts are:
  236.  
  237.  
  238.     (1)  IA5Text
  239.  
  240.     (2)  For X.400/84: ISO6937Text and Teletex
  241.  
  242.     (3)  For X.400/88: GeneralText
  243.  
  244.     IA5Text is the method of choice for E-mail that contains only
  245.     characters from IA5 (equivalent to ASCII).
  246.  
  247.     The ISO6937Text body part is defined in the ISO DIS documents
  248.     corresponding to X.400(84) [MOTIS-86]; these never became a
  249.     standard, so they are now quite difficult to find. It is in
  250.     principle limited to using text that can be presented in ISO 6937,
  251.     but since ISO 6937 refers to the ISO 2022 method of changing
  252.     character sets, it is theoretically possible to use any ISO
  253.     registered character set, but there is no facility for announcing
  254.     the character sets used. This makes interworking with equipment
  255.     that does not support the same character sets complex.
  256.  
  257.     It is still, however, the only body part suitable for carrying
  258.     non-paginated text in non-basic character sets in X.400(84).
  259.  
  260.     Teletex, which is identical in all versions of the X.400 standard,
  261.     has the same problem of implicit ISO6937, but has the added
  262.     problem that it also specifies a page format, with, for instance,
  263.     a left margin of 5 character positions. This is often not
  264.  
  265.  
  266.  
  267.  
  268.  
  269. Alvestrand                Expires Sep 18 93                   [Page 5]
  270.  
  271. draft            X.400 use of extended character sets           Mar 93
  272.  
  273.  
  274.     desirable.
  275.  
  276.     The details of Teletex are specified in recommendation T.51 and
  277.     its relatives.
  278.  
  279.     GeneralText is defined in ISO 10021-8, the part of [MOTIS] that
  280.     corresponds to CCITT recommendation [X.420]. It is an Extended
  281.     body part, so no modification to CCITT implementations is needed
  282.     to carry it.
  283.  
  284.     GeneralText is suitable for interchange, since it has got proper
  285.     announcement facilities. It can use any number of character sets,
  286.     and announces them both in the Encoded Information Types of the
  287.     X.400 envelope and the parameters of the body part.
  288.  
  289.     We recommend this body part for carrying unformatted text in
  290.     X.400/88.
  291.  
  292.  
  293.     3.  GUIDELINES FOR THE GENERATION OF GENERALTEXT
  294.  
  295.  
  296.     3.1.  Formal definition of GeneralText
  297.  
  298.     A GeneralText message is a byte stream that contains characters
  299.     and character switching sequences according to [ISO 2022].
  300.  
  301.     The X.400 ASN.1 definition of the GeneralText body part is:
  302.  
  303.  
  304.     general-text-body-part EXTENDED-BODY-PART-TYPE
  305.         PARAMETERS GeneralTextParameters IDENTIFIED BY id-ep-general-text
  306.         DATA       GeneralTextData
  307.         ::= id-et-general-text
  308.  
  309.     GeneralTextParameters ::= SET OF CharacterSetRegistration
  310.  
  311.     CharacterSetRegistration ::= INTEGER (1..32767)
  312.  
  313.     GeneralTextData ::= GeneralString
  314.  
  315.  
  316.     The definition is from ISO/IEC 10021-7 [MOTIS], Annex I, with
  317.     modifications made in the MHS Implementor' Guide, version 8,
  318.  
  319.  
  320.  
  321.  
  322.  
  323. Alvestrand                Expires Sep 18 93                   [Page 6]
  324.  
  325. draft            X.400 use of extended character sets           Mar 93
  326.  
  327.  
  328.     chapter 3.6.3, bullet F130. It does not appear in the CCITT
  329.     version of the standards.
  330.  
  331.  
  332.     3.2.  Brief description of ISO 2022 character set switching
  333.  
  334.     There are 4 graphic character sets active at any time in a
  335.     GeneralText message, called G0, G1, G2 and G3. In addition, there
  336.     are 2 control character sets, called C0 and C1.
  337.  
  338.     At any moment, one of the sets G0-G3 is active in code positions
  339.     2/1 to 7/14, and another is active in code positions 10/0 to
  340.     15/15. The setting is achieved by so-called "locking shift"
  341.     sequences.
  342.  
  343.     (Formally, code positions 2/0 and 7/15 are reserved for "space"
  344.     and "DEL" respectively, and only 94-character character sets can
  345.     be used in G0. In practice, this restriction is sometimes ignored)
  346.  
  347.     Single characters from the non-active sets may be invoked by the
  348.     use of "single shift" sequences.
  349.  
  350.     The control character sets always occupy the code positions 0/0 to
  351.     1/15 (C0) and 8/0 to 9/15 (C1).
  352.  
  353.     The character sets currently active as G0-G3 and C0-C1 may be
  354.     changed using "character set designating sequences".
  355.  
  356.     At the beginning of a GeneralText message, one must always assume
  357.     that set 2 (IA5) is active as G0, shifted into the lower half,
  358.     that set 1 (standard) is active as C0, and that no G1-G3 or C1 set
  359.     is invoked. This is specified in the definition of "GeneralString"
  360.     in [X.209], the definition of ASN.1 encoding (section 23.5.2).
  361.  
  362.     If this is not a suitable initial state, a message must always
  363.     start with the necessary announcers and escape sequences to
  364.     designate and invoke the character sets that are actually used.
  365.     The character sets in use may be changed later in the message by
  366.     use of escape sequences.
  367.  
  368.     The parameters of a GeneralText message always list all the
  369.     character sets used, by quoting their ISO reference numbers.
  370.  
  371.     It is impossible to use a character set not registered with ISO in
  372.  
  373.  
  374.  
  375.  
  376.  
  377. Alvestrand                Expires Sep 18 93                   [Page 7]
  378.  
  379. draft            X.400 use of extended character sets           Mar 93
  380.  
  381.  
  382.     a GeneralText message.
  383.  
  384.     It is also impossible to decide on the true meaning of a byte in a
  385.     GeneralText message without scanning the whole message for shift
  386.     and escape sequences.
  387.  
  388.  
  389.     3.3.  How to use the character sets
  390.  
  391.     RECOMMENDATION:
  392.  
  393.     When the text to be rendered is representable in one of the
  394.     character sets of ISO-8859, the G0 set should be set to ISO 646
  395.     International Reference Version (1991), also called US-ASCII,
  396.     ISO-IR-6.
  397.  
  398.     The older character set ISO-IR-2, ISO 646 IRV(1983), should NOT be
  399.     used.  This means that the escape sequence ESC 2/8 4/2
  400.     (designating ASCII as G0) should always occur at the beginning of
  401.     the message.
  402.  
  403.     The G1 set should be set to the relevant ISO-8859 part. G2 and G3
  404.     are not used.
  405.  
  406.     This corresponds to the first level of ISO 4873 usage.
  407.  
  408.     For the currently defined parts of ISO 8859, the character set
  409.     designations are (relative to ISO 8859:1987):
  410.  
  411.     Part    ISO IR name             Escape sequence Remarks
  412.                                     for G1 use
  413.  
  414.     1       ISO-IR-100              Esc 2D 41       West Europe
  415.     2       ISO-IR-101              Esc 2D 42       East European
  416.     3       ISO-IR-109              Esc 2D 43
  417.     4       ISO-IR-110              Esc 2D 44
  418.     5       ISO-IR-144              Esc 2D 4C       Cyrillic
  419.     6       ISO-IR-127              Esc 2D 47       Arabic
  420.     7       ISO-IR-126              Esc 2D 46       Greek
  421.     8       ISO-IR-138              Esc 2D 48       Hebrew
  422.     9       ISO-IR-148              Esc 2D 4D       Turkish
  423.  
  424.     NOTE: The use of ISO 8859-3 and ISO 8859-4 is NOT recommended if
  425.     other possibilities exist.
  426.  
  427.  
  428.  
  429.  
  430.  
  431. Alvestrand                Expires Sep 18 93                   [Page 8]
  432.  
  433. draft            X.400 use of extended character sets           Mar 93
  434.  
  435.  
  436.     (Note that there is some confusion as to what parts are actually
  437.     standardized; the Norwegian standards institute reports that only
  438.     part 1, 2, 3, 4, 6, 7 and 8 are currently standards. I have also a
  439.     copy of a DIS for part 10, which was voted on in 1991; the fact
  440.     that it is not a standard seems to indicate that the ballot
  441.     failed.  The character set is registered as ISO-IR-157 anyway.)
  442.  
  443.     The G1 set should be permanently shifted into the upper half of
  444.     the code page.
  445.  
  446.     When the text is not representable in one of the ISO-8859
  447.     character sets, the following rules may be applied:
  448.  
  449.  
  450.     (1)  If any Latin characters are used, keep IA5 as the G0 set.
  451.  
  452.     (2)  If a mainstream character set is used (Greek, Cyrillic,
  453.          Hebrew, Arabic), designate this as the G1 character set, and
  454.          permanently shift this into the upper half of the code page
  455.          (LS1R).
  456.          EXCEPTION: The Japanese community has a long tradition of
  457.          switching between the Japanese 16-bit character set ISO-IR-87
  458.          and USASCII as the G0 set. See [RFC-2022-JP] for details. If
  459.          ISO-IR-87 is used, that technique should be used instead of
  460.          the one recommended here.
  461.  
  462.     (3)  If occasional extensions to a character set that is basically
  463.          Latin occur (like accents, national variants and so on), and
  464.          these are available in a single character set, designate the
  465.          relevant set as G2 and use single shift (SS2) to invoke
  466.          characters from this character set.
  467.  
  468.          The ISO 8859 supplementary set, ISO-IR-154, is recommended
  469.          for this purpose.
  470.  
  471.          This corresponds to the ISO 4873 "second level" application.
  472.  
  473.     (4)  If two non-Latin character sets are used, the second should
  474.          be designated as G3, and shifted into the upper half of the
  475.          code page by the use of Locking Shift 3 Right (LS3R).
  476.  
  477.          This corresponds to the ISO 4873 "third level" application.
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485. Alvestrand                Expires Sep 18 93                   [Page 9]
  486.  
  487. draft            X.400 use of extended character sets           Mar 93
  488.  
  489.  
  490.     (5)  If avoidable, use of character sets with floating accents,
  491.          like ISO 6937, should be avoided.
  492.  
  493.     (6)  The shifts changing the lower half of the code table (SI/SO,
  494.          LS2 and LS3) should NOT be used.
  495.  
  496.     RATIONALE: Keeping the G0 set reserved for ASCII will ensure that
  497.     text in ASCII has the same bit representation always.
  498.  
  499.     The use of the upper code page for other scripts ensures that both
  500.     text in these languages and text of this type mixed with English
  501.     can be represented without the use of shift sequences.
  502.  
  503.     If the language and/or content of a text is completely unknown,
  504.     chapter 5 gives an algorithm that may be used to decide upon the
  505.     character sets. This might, for instance, be suitable for use at
  506.     automatic mail gateways.
  507.  
  508.     NOTE: At the time of this writing, few applications that use ISO
  509.     4873 level 2 and level 3 encoding exist. It has been estimated
  510.     that implementing them in an application that already uses a rich
  511.     repertoire of characters is a matter of programmer-days, not
  512.     programmer-months, but this has not been proven.
  513.  
  514.  
  515.     4.  GUIDELINES FOR THE RENDERING OF GENERALTEXT
  516.  
  517.     As a basic rule, one should NOT assume that any of the rules above
  518.     are followed.
  519.  
  520.     An user agent capable of rendering GeneralText should:
  521.  
  522.  
  523.     (1)  ALWAYS be able to identify and render characters in IA5, no
  524.          matter how they are designated and invoked.
  525.  
  526.     (2)  ALWAYS be able to identify and render characters in the
  527.          "native" character sets, no matter how they are designated
  528.          and invoked.
  529.  
  530.     (3)  ALWAYS indicate the presence of characters that cannot be
  531.          adequately represented on the current output device.
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539. Alvestrand                Expires Sep 18 93                  [Page 10]
  540.  
  541. draft            X.400 use of extended character sets           Mar 93
  542.  
  543.  
  544.     (4)  NEVER render a character in an unknown or unrepresentable
  545.          character set by displaying the character in the same bit
  546.          position in the native character set.
  547.  
  548.     (5)  PREFERABLY be able to identify and render characters that are
  549.          the same as characters in the "native" character sets, even
  550.          though they are designated and invoked as part of other
  551.          character sets.  This applies in particular to the
  552.          "invariant" part of ISO 8859, parts 1 through 6.
  553.  
  554.     (6)  PREFERABLY be able to combine the floating accents of ISO
  555.          6937 with their base characters for suitable rendering using
  556.          the capabilities of the current output device.
  557.  
  558.     (7)  PREFERABLY be able to display text both in a mode using
  559.          fallbacks for nonrenderable characters and in a mode
  560.          designating nonrenderable characters as such.
  561.  
  562.     (8)  PREFERABLY be able to save the content of a GeneralText
  563.          message to a file or other suitable media, saving all
  564.          character set information, for later processing by other
  565.          means.  It is not illegal to render the character set
  566.          information into a different format; however, it should be
  567.          noted that it is easy to lose vital information if the format
  568.          chosen for representing character sets does not offer the
  569.          possibility of referencing all character sets in the ISO
  570.          registry of character sets.
  571.  
  572.     These requirements also apply to gateways that transform the
  573.     message into some other format, for example a gateway that
  574.     transforms a message into MIME using [RFC-2022-JP] for the
  575.     purpose.
  576.  
  577.  
  578.     5.  RECOMMENDATION FOR SELECTION OF CHARACTER SETS
  579.  
  580.  
  581.     5.1.  Algorithm for selection of character sets
  582.  
  583.     When one has text in which characters from several character sets
  584.     occurs, and wants to process this into a GeneralText document, it
  585.     is often hard to guess right at the character sets to select.
  586.  
  587.     The following paragraphs give an algorithm that can be started at
  588.  
  589.  
  590.  
  591.  
  592.  
  593. Alvestrand                Expires Sep 18 93                  [Page 11]
  594.  
  595. draft            X.400 use of extended character sets           Mar 93
  596.  
  597.  
  598.     the beginning of a message, and at the end of it, return a set of
  599.     character sets that can be used as G0..G3 character sets, OR an
  600.     indication that the task is impossible.
  601.  
  602.     VARIABLES:
  603.  
  604.     UsedSets
  605.          The set of character sets that MUST be used for this message
  606.  
  607.     UsableSets
  608.          The set of character sets that MAY be used for this message.
  609.          Each set also contains a counter for each character position.
  610.  
  611.     PossibleSets
  612.          The set of all the character sets known to be usable in the
  613.          destination format.
  614.  
  615.          ALGORITHM:
  616.  
  617.     1)   Add IA5 (ISO-IR-6) to the UsedSets (as G0).
  618.  
  619.     2)   Get the next character of the text.  If the text is
  620.          completely analyzed, go to FINISHED
  621.  
  622.     3)   If it is in the UsedSets, go to 2).
  623.  
  624.     4)   Find the set of character sets from PossibleSets in which the
  625.          character occurs. If it does not occur in any, report
  626.          failure.
  627.  
  628.     5)   If it is in a single character set in PossibleSets only, add
  629.          this set to UsedSets, and go to 2).
  630.  
  631.     6)   If it is in more than one character set, add these to
  632.          PossibleSets (if not already present), and increment the
  633.          counter for that character in all the sets. Go to 2).
  634.  
  635.     FINISHED)
  636.  
  637.     1)   (FINAL SELECTION) Remove any character set in UsedSets from
  638.          PossibleSets.
  639.  
  640.          Zero the counters for any character in PossibleSets that also
  641.          occurs in UsedSets.
  642.  
  643.  
  644.  
  645.  
  646.  
  647. Alvestrand                Expires Sep 18 93                  [Page 12]
  648.  
  649. draft            X.400 use of extended character sets           Mar 93
  650.  
  651.  
  652.          WHILE (more characters left)
  653.            Select one character set and move it from PossibleSets to UsedSets.
  654.            Zero the counters for all characters in this set in the other
  655.            PossibleSets.
  656.          END WHILE
  657.          This step can be "tuned" any way you want, for instance by
  658.          choosing the character sets most likely to be understood at
  659.          the destination first, choosing the character sets covering
  660.          the most characters first, avoiding multi-byte character sets
  661.          as long as possible, or any other scheme suitable for the
  662.          application.
  663.  
  664.     5.2.  WHAT TO DO ON FAILURE
  665.  
  666.     Failure will occur in this schema if a character is found that is
  667.     not in the PossibleSets. It may then be handled in one of the
  668.     following ways:
  669.  
  670.     (1)  Replace the character with the SUB control character
  671.  
  672.     (2)  Replace the character with Keld Simonsen Mnemonics [RFC-
  673.          1345]. This is a reversible transformation as long as the
  674.          recipient is aware that it has been used, but requires
  675.          passing out-of-band information to indicate this.
  676.  
  677.     (3)  Replace the lost characters with any suitable fallback or
  678.          mnemonic scheme intended for human understanding
  679.  
  680.     (4)  Bounce the message/refuse the conversion/give up.
  681.  
  682.     The action to be taken may be different based on the percentage of
  683.     "lost" characters.
  684.  
  685.     If the message has "controls" like "conversion with loss
  686.     prohibited", only the last possibility may be used.
  687.  
  688.  
  689.     5.3.  RECOMMENDED CHARACTER SETS
  690.  
  691.     There are 2 steps in the algorithm above that are left for local
  692.     judgement:
  693.  
  694.     (1)  Selection of the sets to appear in PossibleSets.
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701. Alvestrand                Expires Sep 18 93                  [Page 13]
  702.  
  703. draft            X.400 use of extended character sets           Mar 93
  704.  
  705.  
  706.     (2)  The algorithm for deciding which character set to select in
  707.          step 9.
  708.  
  709.     In the context of generating X.400 GeneralText messages, the
  710.     following is recommended:
  711.  
  712.     Sets in PossibleSets:
  713.     ISO-IR-6        Esc 28 42 (G0)  US-ASCII, IA5, ISO646
  714.     ISO-IR-100      Esc 2D 41 (G1)  ISO-8859-1      West Europe
  715.     ISO-IR-101      Esc 2D 42 (G1)  ISO-8859-2      Central/Eastern Europe
  716.     ISO-IR-144      Esc 2D 4C (G1)  ISO-8859-5      Cyrillic
  717.     ISO-IR-127      Esc 2D 47 (G1)  ISO-8859-6      Arabic
  718.     ISO-IR-126      Esc 2D 46 (G1)  ISO-8859-7      Greek
  719.     ISO-IR-138      Esc 2D 48 (G1)  ISO-8859-8      Hebrew
  720.     ISO-IR-148      Esc 2D 4D (G1)  ISO-8859-9      Turkish
  721.  
  722.     The following multi-byte character sets are recommended:
  723.  
  724.     ISO-IR-87 (Japanese JIS C6226-1983)     Esc 24 29 42 (G1)
  725.     ISO-IR-149 (Korean KS C 5601-1989)      Esc 24 29 43 (G1)
  726.     ISO-IR-58 (Chinese GB 2312-80)          Esc 24 29 41 (G1)
  727.  
  728.     It is a STRONG recommendation that character sets not listed
  729.     above, which do not add any new characters to the total set of
  730.     characters given by the character sets above, should NOT be used
  731.     in X.400 interchange.
  732.  
  733.     ISO-IR-87 is the Japanese character set that is allowed in a
  734.     Teletex string, such as the subject field.
  735.  
  736.     NOTE: ISO-IR-87 has been "superseded" by ISO-IR-168, which allows
  737.     two extra Kanji characters. Any application that handles ISO-IR-87
  738.     should also be able to handle ISO-IR-168.
  739.  
  740.     Algorithm for selecting character sets:
  741.  
  742.     Start at the top of the list above, and add each set only if it is
  743.     needed.
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755. Alvestrand                Expires Sep 18 93                  [Page 14]
  756.  
  757. draft            X.400 use of extended character sets           Mar 93
  758.  
  759.  
  760.     6.  REFERENCES
  761.  
  762.  
  763.     [ISO 4873]
  764.          8-bit character sets - Procedures for use (not exact title)
  765.  
  766.     [ISO 8859]
  767.          Information technology - 8-bit single-byte coded graphic
  768.          character sets (parts 1-9)
  769.  
  770.     [ISO 6937]
  771.          Information technology - Coded graphic character set for text
  772.          communication (parts 1 and 2)
  773.  
  774.     [ISO 639]
  775.          Code for the representation of names of languages. 1988
  776.          version.
  777.  
  778.     [X.209]
  779.          CCITT Recommendation X.209(1988): Specification of Basic
  780.          Encoding Rules for Abstract Syntax Notation One (ASN.1).
  781.          Technically aligned with ISO 8825 and ISO 8825/AD 1.
  782.  
  783.     [ISO 10646]
  784.          Information Technology - Universal Multiple-Octet Coded
  785.          Character Set (UCS) - ISO 10646
  786.  
  787.     [RFC-2022-JP]
  788.          Mark Crispin and Erik van der Poel: Japanese Character
  789.          Encoding for Internet Message Bodies, Internet-Draft.
  790.          Referred version: draft-ietf-822ext-iso2022jp-02.txt
  791.  
  792.     [RFC-1345]
  793.          Keld Simonsen: Character Mnemonics & Character Sets, RFC
  794.          1345, June 1992
  795.  
  796.  
  797.  
  798.  
  799.  
  800. Alvestrand                Expires Sep 18 93                  [Page 15]
  801.  
  802.  
  803.